﻿package com.saint.utils 
{
	import flash.geom.Point;
	/**
	 * 
	 * calculates the straight line distance between 2 points
	 * 
	 * @author kembera
	 */
	public class DistanceBetweenPoints
	{
		
		public function DistanceBetweenPoints() 
		{
			
		}
		
		public static function calculateDistance(pnt1:Point, pnt2:Point):Number
		{
			var xDist:Number  = pnt2.x - pnt1.x;
			var yDist:Number  = pnt2.y - pnt1.y;
			
			var totalDist:Number = Math.sqrt((xDist * xDist) + (yDist * yDist));
			
			return totalDist
		}
		
	}

}